package br.gov.cemaden.library.repository.previsao;

import br.gov.cemaden.library.model.previsao.AquisicaoTempo;
import javax.persistence.EntityManager;

/**
 *
 * @author alan
 */
public class AquisicaoTempoRepository {
    
    private final EntityManager em;

    public AquisicaoTempoRepository(EntityManager em) {
        this.em = em;
    }        
    
    public AquisicaoTempo persist(AquisicaoTempo aquisicao){
        em.getTransaction().begin();
        em.persist(aquisicao);
        em.flush();
        em.getTransaction().commit();
        em.refresh(aquisicao);        
        return aquisicao;
    }
    
}
